<template>
  <el-dialog
    class="operate-record-dialog"
    ref="deliverDialog"
    :title="title"
    :visible.sync="visible"
    @close="$emit('update:show', false)"
    :show="show"
  >
    <el-editable
      :stripe="true"
      :data="operateData"
      :columns="columns"
      v-loading="loading"
    />
  </el-dialog>
</template>

<script>
import ElEditable from '@components/el-editable/index.vue'

import { OPERATE_RECORD_COLUMNS } from './const'
export default {
  name: 'OperateRecordDialog',
  components: { ElEditable },
  props: {
    show: {
      type: Boolean,
      default: false
    },
    operateData: {
      type: Array,
      default: () => []
    },
    loading: {
      type: Boolean,
      default: false
    },
    customColumns: {
      type: Array,
      default: () => []
    }
  },
  data () {
    return {
      visible: this.show,
      title: '操作记录',
      columns: OPERATE_RECORD_COLUMNS
    }
  },
  watch: {
    show (status) {
      this.visible = this.show
    }
  }
}
</script>

<style lang="less" scoped>

</style>
